<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <body>

        <ui:composition template="./../adminTemplate.xhtml">

            <ui:define name="title">
                title
            </ui:define>
             
            <ui:define name="page">
               <h:form class= "form">
                   <p> Redigera vara <h:outputText value="#{listStock.itemName}"/></p>
            <h:messages style="color:red;margin:8px;" />
            
            Id: <h:inputText value="#{listStock.itemID}" ></h:inputText>
            Varunamn: <h:inputText value="#{listStock.itemName}"></h:inputText>
            Beskrivning: <h:inputText value="#{listStock.itemDescription}"></h:inputText>
            
            <h:outputLabel for= "radioButt" value="Speciell ingrediens"/>
            
            <h:selectOneRadio value="#{listStock.itemRarity}" id="radioButt" class="inline">
                        
                    <f:selectItem itemLabel="ja" itemValue= "1"/>
                    <f:selectItem itemValue="0" itemLabel="nej" />
                 
            </h:selectOneRadio>
	
            
            Antal: <h:inputText value="#{listStock.itemStock}"></h:inputText>
          
            <h:commandButton value ="spara" action="#{listStock.upDate()}"> 
            </h:commandButton>
            
        </h:form>
            </ui:define>

        </ui:composition>

    </body>
</html>
